<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>行政论坛投稿管理</title>
<%@ include file="/module/js.jsp"%>
	 <script type="text/javascript">
		     function formaterSubject(value, row, index) {
		        return "<a href='${basePath}/forumContributions/modiftyManagerContributionsForWard?tgid=" + row.tgid +"'>" + value + "</a>";
	         }
		 
			$(document).ready(
							function() {
	                             $('#dg').datagrid({
								 /*onSortColumn :function(sort,order){
								   var _sort=sort;
								   var _order=order;
								   var options=$('#dg').datagrid('getPager').data("pagination").options;
								   var page=options.pageNumber;
								   var pageSize=options.pageSize;
								   window.setTimeout(function(){
									   $.post("${basePath}/forumContributions/jkyContributionManagerList",{orderFlag:_order,orderField:_sort,
										   subject: $('#subject').val(),
										   beginTime :$('#beginTime').val(),
									       endTime :$('#endTime').val(),
									       creatorname :$('#creatorname').val()
									    },function(data){
										 $('#dg').datagrid("loadData",data); 
										});
								       },100);  
								   },*/
								   rowStyler: function(index,row){
								   },
								
	                          });
								
								//查询
								$('#btnQuery')
										.click(
												function() {
													$('#dg').datagrid('load',{
														 subject: $('#subject').val(),
														 beginTime :$('#beginTime').val(),
													     endTime :$('#endTime').val(),
													     creatorname :$('#creatorname').val()
													});
												});
								//导出
								$('#btnExport')
										.click(
												function() {
													document.Form.action = "${basePath}/forumContributions/exportManagerContributions";
													document.Form.submit();
												});
			
		         });
			
			
		 if("${msg}"!=""){
		       layer.alert("${msg}", {icon: 6});
		 } 
				
		</script>

</head>
<body>
	<form action="#" name="Form" id="Form" method="post">
		<input type="hidden" name="idList" id="idList"/>
		<table cellpadding="1" cellspacing="1" border="0">
			<tr>
				<td><input type="button" id="btnQuery" value="查询"
					class="inputButton" /></td>
					<%--    <kl:permission permisstionList="${permisstionList}" currentUser="${_login_console_user}" currentCatalogId="<%=CatalogUtils.getCatalogId("OF_ZLTS_CLGL")%>" key="add">	 --%>
				<td><input type="button" id="btnExport"  value="导出 "
					class="inputButton" /></td>
					<%-- </kl:permission>--%>
			</tr>
		</table>
	   <table cellpadding="1" cellspacing="1">
			<tr>
				<td>投稿人：</td>
				<td><input type="text" name="creatorname" id="creatorname"  autocomplete="off" class="inputText2" /></td>
				<td>主题：</td>
				<td><input type="text" name="subject" id="subject"  autocomplete="off" class="inputText2" /></td>
				<td>投稿日期：</td>
				<td>从<input type="text" name="beginTime" id="beginTime"  autocomplete="off" class="Wdate inputText2" readonly  onClick="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endTime\',{});}'})" />到<input type="text" name="endTime" id="endTime"  autocomplete="off" class="Wdate inputText2" readonly  onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'beginTime\',{d:1});}'})" /></td>
			</tr>
		</table>
		<br/>	
        <table id="dg"  style="width:75%;"
		data-options="pagination:true,collapsible:true,url:'${basePath}/forumContributions/jkyContributionManagerList',method:'post',remoteSort:true,striped:true"> 
		<thead>
			<tr>
<!-- 				<th data-options="field:'tgid',checkbox:true,width:60,align:'left'"></th> -->
				<th data-options="field:'creatorname',sortable:true,nowrap:true,width:300,align:'left'">投稿人</th>
				<th data-options="field:'createtime',sortable:true,nowrap:true,width:300,align:'left',formatter:formatDate">投稿时间</th>
				<th data-options="field:'docnum',sortable:true,nowrap:true,width:100,align:'left'">投稿数量</th>
				<th data-options="field:'subject',sortable:true,nowrap:true,width:300,align:'left',formatter:formaterSubject">主题</th>
			    <th data-options="field:'remark',sortable:true,nowrap:true,width:200,align:'left'">备注</th>
			</tr>
		</thead>
	</table>
	</form>
</body>
</html>
